import cookie from "js-cookie";

export const setToken = (token: string, username: string) => {
  cookie.set("token", token);
  cookie.set("username", username);
};

export const getToken = () => {
  return cookie.get("token");
};

export const removeToken = () => {
  // cookie.clear()
  cookie.remove("token");
  cookie.remove("username");
};

export const getName = () => {
  return cookie.get("username");
};
